package com.hong.service;

import org.springframework.beans.factory.ObjectFactory;

/**
 * Created by John on 2018/10/26.
 */
public class BizService {
    private ObjectFactory userServiceBeanFactory;

    public UserService getUserService() {
        return (UserService) userServiceBeanFactory.getObject();
    }

    public void setUserServiceBeanFactory(ObjectFactory userServiceBeanFactory) {
        this.userServiceBeanFactory = userServiceBeanFactory;
    }

    public void persistUserService(){
        System.out.println("persist bean:" + getUserService());
    }

}
